Part Number Hot Search : 
BA6412 C2600 S089B 32M10 SA150 222M35 TW8833S S3700
Product Description
Full Text Search
 

To Download AN2511 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  august 2010 doc id 13286 rev 2 1/43 AN2511 application note pmbus tm interface using st7 i 2 c introduction the pmbus tm (power management bus) is an open standard protocol that defines a means of communicating with power conversion and other devices. the pmbus protocol helps to establish the first truly open communications standard for the digital control of power systems. implemented over the industry-standard smbus (system management bus) serial interface, the pmbus protocol facilitates the programming, cont rol and real-tim e monitoring of compliant power conversion products. this application note describes how to use the st7 i 2 c peripheral for pmbus communication. the firmware of this application performs the pmbus bus protocols mentioned in pmbustm power system management protocol specification v1.0. the device chosen here is st72264g1 which has multi-master i 2 c capability. this microcontroller acts as the pmbus master. it controls the pmbus compatible slaves. the firmware described in this application note is in c language. to show the pmbus capabilities of st7, a ded icated demonstration boar d is developed. this board consists of the st72f264g1 microcontroller and it works with pc hyperterminal. the objective of this demonstration board is to sh ow to the user the feat ures and capabilities of pmbus features using st7 i 2 c peripheral, to support the standard pmbus commands. the results of this demonstration board interfaced with artesyn's pmbus module are shown in this application note. www.st.com
contents AN2511 2/43 doc id 13286 rev 2 contents 1 pmbus introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1 pmbus protocol description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1.1 smbus version 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1.2 extensions to smbus version 1.1 specification . . . . . . . . . . . . . . . . . . . . 6 1.2 hardwired signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.1 electrical interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 implementation of pmbus using st7 i 2 c . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1 firmware architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.1 i 2 c initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.2 slave address and command code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.3 read and write operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3 pmbus commands and source code . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 pmbus commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2 source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.3 example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.4 limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4 pmbus interfacing results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.1 interfacing with artesyn module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.2 interfacing with silabs module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5 pmbus demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.1 system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2 software setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.3 hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6 using the demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1 normal operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1.1 selection of communication speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1.2 selection of packet error checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
AN2511 contents doc id 13286 rev 2 3/43 6.1.3 selection of slave address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1.4 selection of read/write mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.1.5 single read mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.1.6 continuous read mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.7 write mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.8 group command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 6.2 error conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2.1 invalid command code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2.2 communication timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 7 hardware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 7.1 schematic and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 7.2 bill of materials (bom) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 7.3 demonstration board photo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 appendix a configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 a.1 rs232 configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
list of tables AN2511 4/43 doc id 13286 rev 2 list of tables table 1. operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 table 2. on_off_config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 table 3. clear_faults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 table 4. restore_default_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 5. store_user_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 6. vout_mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 7. vout_command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 8. vout_max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 9. vout_margin_high . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 10. vout_margin_low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 table 11. vout_ov_warn_limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 table 12. vout_uv_warn_limit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 13. iout_oc_fault_limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 14. iout_oc_warn_limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 15. ot_fault_limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 16. ot_fault_response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 5 table 17. ot_warn_limit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 18. ton_delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 19. ton_rise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 20. toff_delay. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 21. toff_fall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 22. status_byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 23. status_word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 24. status_vout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 25. status_iout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 26. status_temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 27. status_mfr_specific . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8 table 28. read_vout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 table 29. read_iout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 table 30. read_temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 table 31. pmbus_revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 32. mfr_id . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 33. mfr_model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 34. mfr_revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 35. mfr_location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 table 36. mfr_date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 table 37. mfr_serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 table 38. mfr_specific_00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 table 39. mfr_specific_01 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 40. mfr_specific_02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 table 41. pmbus interfacing with artesyn module: results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 42. pmbus interfacing with silabs module: results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 43. bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 44. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
AN2511 list of figures doc id 13286 rev 2 5/43 list of figures figure 1. interface diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 figure 2. flowchart: i 2 c initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 figure 3. flowchart: data length calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 figure 4. flowchart: read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 figure 5. flowchart: write operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 figure 6. pc hyperterminal application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 7. baud rate configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 8. hyperterminal settings - ascii setup configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 9. hyperterminal message to show company name and selection of communication speed 30 figure 10. pec selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 11. slave address entry message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 12. wrong slave address entry - response 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 13. wrong slave address entry - response 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 14. options to select read/ write mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 15. single read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 16. continuous read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 figure 17. write mode command code entry message from hyperterminal . . . . . . . . . . . . . . . . . . . . 32 figure 18. write mode data entry message from hyperterminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 figure 19. write mode operation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 figure 20. read operation to check data writing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 figure 21. group command code entry message from hyperterminal. . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 22. group command operation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 23. invalid command message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 figure 24. example of invalid command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 figure 25. communication timeout message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5 figure 26. demonstration board schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 figure 27. top view layout of the demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 figure 28. bottom view layout of the demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 figure 29. steval-isq002v1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 figure 30. pin description of rs232 d9 connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1
pmbus introduction AN2511 6/43 doc id 13286 rev 2 1 pmbus introduction 1.1 pmbus protocol description the pmbus protocol is intend ed to cover a wide range of power system architectures and converters. pmbus devices must use the system management bus (smbus), version 1.1. implemented over the industry-stand ard smbus serial interface, the pmbus protocol facilitates the programming, control and real-time monitoring of compliant power conversion products. 1.1.1 smbus version 1.1 the system management bus (smbus) is a two-wire interface through which various system component chips can communicate with each other and with the rest of the system. it is based on the principles of operation of i 2 c. for more information about smbus, refer to an1713 , available from www.st.com . 1.1.2 extensions to smbus version 1.1 specification 1. block write-block-read process call to support certain commands of the pmbus command language, pmbus devices must support the "block write-block-read process call" described in section 5.5.8 of version 2.0 of the smbus specification . 2. host notify protocol pmbus devices may support the host notify protocol described in section 5.5.9 of version 2.0 of the smbus specification . if a pmbus device supports the host notify protocol, the two data bytes sent to the host are the same as the data bytes returned by the status_word command. 3. group command protocol pmbus devices must support the group command protocol. the group command protocol is used to send commands to more than one pmbus device. the commands are received in one transmission. when the devices detect the stop condition that ends the command, they all begin executing the command they received. 4. addressing pmbus devices use seven bit addresses. 5. packet error checking (pec) support for the smbus packet error checking (pec) protocol is optional. 1.2 hardwired signals 1.2.1 electrical interface the following diagram shows the interface between different pmbus devices. st72264g1 is the selected microcontroller, which has a multi-master i 2 c interface. this microcontroller acts as pmbus master. it communicates with any compatible pmbus slave using a 4-pin interface. smbc is the clock from the master. smbd is the data pin. both smbc and smbd should be pulled up with a 4.7 k resistor. smbalert is the smbus alert pin, which helps
AN2511 pmbus introduction doc id 13286 rev 2 7/43 the slave to alert the master whenever it wants to communicate. the control pin is used to switch on or off a pmbus slave. figure 1. interface diagram the control signal is an input signal on a po wer converter. it is used to turn the unit on and off in conjunction with commands received via the serial bus. it can be configured as an active high or active low signal through the on_off_config command (refer to section 3.1 ). this signal is optional but recommended. 1.2.2 timing no specific requirements are made when a pmbus device must respond to a state change of a hardwired signal. pmbus master (st72f264g1) smbc (scl) smbd (sda) smba (pa3) pmbus slave smbc smbd smba control control (pc0)
implementation of pmbus using st7 i2c AN2511 8/43 doc id 13286 rev 2 2 implementation of pmbus using st7 i 2 c 2.1 firmware architecture this section explains sequence of operation for different software modules. 2.1.1 i 2 c initialization to use st7 i 2 c for pmbus communication, the peri pheral is initialized for 100 khz communication speed. the i 2 c is configured with an address of 0x30, as it can act as a slave due to its multi-mast er capability. the following flowchart shows the sequence. figure 2. flowchart: i 2 c initialization the above flowchart is implemented in the function pmbus_init. 2.1.2 slave address and command code the pmbus master addresses the slave with a 7-bit address. once the slave device acknowledges the address, the command code is sent corresponding to the pmbus command and smbus protocol (refer to section 3.1 ). then, the microcontroller decodes the command code as shown in the following sequence. simultaneously, the smbus_mode variable is updated. start initialize i 2 c cr, ccr, oar1 and oar2 registers configure slave addresses in oar1 and oar2 enable i 2 c peripheral and acknowledge in i2ccr register set communication speed as 100khz in i2cccr register stop
AN2511 implementation of pmbus using st7 i2c doc id 13286 rev 2 9/43 figure 3. flowchart: data length calculation inside both pmbus_commandread and pmbus_commandwrite functions, pmbus_datalengthcalc is called which calculates the data length based on the command code received. 2.1.3 read and write operation pmbus master performs read/ write operations with the slave device. depending on the command code, either pmbus_commandread or pmbus_commandwrite is called. inside this function, the smbus transaction type is selected as shown in the following sequence. figure 4. flowchart: read operation start check if command code equal to block protocol check if command code equal to byte protocol check if command code equal to word protocol no no no ye s ye s ye s byte count=6, update smbus_mode for block command byte count=1, update smbus_mode for byte command byte count=2, update smbus_mode for word command stop start check if smbus_mode for byte command check if smbus_mode for word command check if smbus_mode for send block command ye s ye s ye s no no no smbus read byte protocol smbus read word protocol smbus read block protocol stop 1711811711811 s slave address wr a command code a s slave address rd a data byte a p 171181171181 s slave address wr a command code a s slave address rd a data byte low a ... 8181...811 data byte 1 a data byte 2 a ... data byte n a p 171181171181 s slave address wr a command code a sr slave address rd a count byte = 1 a ... 811 data byte high a p
implementation of pmbus using st7 i2c AN2511 10/43 doc id 13286 rev 2 figure 5. flowchart: write operation during the pmbus communication, if there are any errors in communication (acknowledge failure, arbitration loss, bus error or smbus timeout), the i 2 c peripheral is disabled. it is re- initialized again inside the pmbus write/ read functions. in case the smbus alert pin is pulled low by the slave to inform the master that it wants to communicate, the slave address is programmed with the alert response address (0x18). this is acknowledged by the slave that aler ted the master. after the communication between the master and slave is complete, the slave address is programmed with the user-defined slave address. the default value of this user-defined address is 0x30. in case of group operation, the write operation flowchart is followed without the stop condition. start check if smbus_mode for send byte command check if smbus_mode for write word command check if smbus_mode for write block command ye s ye s ye s no no no smbus send byte protocol smbus write word protocol smbus write block protocol stop 1711811 s slave address wr a data byte ap 17118181811 s slave address wr a command code a data byte low a data byte high a p 81...811 data byte 2 a ... data byte n ap 17118181181 s slave address wr a command code a byte count = n rd a data byte 1 a ... ye s smbus write byte protocol 171181811 s slave address wr a command code a data byte ap check if smbus_mode for write byte command
AN2511 pmbus commands and source code doc id 13286 rev 2 11/43 3 pmbus commands and source code 3.1 pmbus commands the part ii - command language document of pmbus? power system management protocol specification v1.0 provides the list of pmbus commands. this driver supports the following list of commands. for ea ch command a table is given. table 1. operation command name operation command code 01h description the operation command is used to turn the unit on and off in conjun ction with the input from the control (outen) pin. smbus transaction type read/ write byte number of data bytes 1 table 2. on_off_config command name on_off_config command code 02h description the on_off_config command configures the combination of control (outen) pin input and serial bus commands needed to turn the unit on and off. smbus transaction type read/ write byte number of data bytes 1 table 3. clear_faults command name clear_faults command code 03h description clear_faults is used to clear any fault bits that have been set. smbus transaction type send byte number of data bytes 0
pmbus commands and source code AN2511 12/43 doc id 13286 rev 2 table 4. restore_default_all command name restore_default_all command code 12h description the restore_default_all command instructs the pmbus device to copy the entire contents of the non-volatile default store memory to the matching locations in the operating memory. any items in default store that do not have matching locations in the operating memory are ignored. smbus transaction type send byte number of data bytes 0 table 5. store_user_all command name store_user_all command code 15h description the store_user_all command instructs the pmbus device to copy the entire contents of the operating memory to the matching locations in the non-volatile user store memory. any items in operating memory that do not have matching locations in the user store are ignored. smbus transaction type send byte number of data bytes 0 table 6. vout_mode command name vout_mode command code 20h description vout_mode command, used for commanding and reading output voltage, consists of a three bit mode (only linear format is supported.) and a five-bit parameter representing the exponent used in output voltage read/writes. smbus transaction type read/ write byte number of data bytes 1
AN2511 pmbus commands and source code doc id 13286 rev 2 13/43 table 7. vout_command command name vout_command command code 21h description vout_command is used to set the output voltage, in volts (linear format). smbus transaction type read/ write word number of data bytes 2 table 8. vout_max command name vout_max command code 24h description the vout_ max command sets an upper limit on the output voltage the unit can command regardless of any other commands or combinations. smbus transaction type read/ write word number of data bytes 2 table 9. vout_margin_high command name vout_margin_high command code 25h description this vout_margin_high command loads the unit with the voltage to which the output is to be changed when the operation command is set to "margin high". smbus transaction type read/ write word number of data bytes 2 table 10. vout_margin_low command name vout_margin_low command code 26h description this vout_margin_low command loads the unit with the voltage to which the output is to be changed when the operation command is set to "margin low". smbus transaction type read/ write word number of data bytes 2 table 11. vout_ov_warn_limit command name vout_ov_warn_limit command code 42h
pmbus commands and source code AN2511 14/43 doc id 13286 rev 2 description the vout_ov_warn_limit command sets the value of the output voltage at the sense or output pins that causes an output voltage high warning. this value is typically less than the output overvoltage threshold. smbus transaction type read/ write word number of data bytes 2 table 12. vout_uv_warn_limit command name vout_uv_warn_limit command code 43h description the vout_uv_warn_limit command sets the value of the output voltage at the sense or output pins that causes an output voltage low warning. this value is typically greater than the output undervoltage fault threshold smbus transaction type read/ write word number of data bytes 2 table 13. iout_oc_fault_limit command name iout_oc_fault_limit command code 46h description the iout_oc_fault_limi t command sets the value of the sense output current, in amps (literal format), that causes an overcurrent fault. smbus transaction type read/ write word number of data bytes 2 table 14. iout_oc_warn_limit command name iout_oc_warn_limit command code 4ah description the iout_ov_warn_limi t command sets the value of the output curren t that causes an output overcurrent warning. smbus transaction type read/ write word number of data bytes 2 table 15. ot_fault_limit command name ot_fault_limit command code 4fh description the ot_fault_limit command sets the value of the sense temperature, in c (literal format), that causes an overtemperature fault table 11. vout_ov_warn_limit (continued)
AN2511 pmbus commands and source code doc id 13286 rev 2 15/43 smbus transaction type read/ write word number of data bytes 2 table 16. ot_fault_response command name ot_fault_response command code 50h description the ot_fault_response command instructs the device on what action to take in response to an overtemperature fault. smbus transaction type read/ write byte number of data bytes 1 table 17. ot_warn_limit command name ot_warn_limit command code 51h description the ot_warn_limit command sets the value of the sense temperature, in c (literal format), that causes an overtemperature warning. smbus transaction type read/ write word number of data bytes 2 table 18. ton_delay command name ton_delay command code 60h description the ton_delay sets the time, in ms, from when a start condition is received (control signal asserted and a valid operation command received) until the output voltage starts to rise. smbus transaction type read/ write word number of data bytes 2 table 19. ton_rise command name ton_rise command code 61h description the ton_rise sets the time, in ms, from when the output starts to ri se until the voltage has entered the regulation band. smbus transaction type read/ write word number of data bytes 2 table 20. toff_delay command name toff_delay command code 64h table 15. ot_fault_limit (continued)
pmbus commands and source code AN2511 16/43 doc id 13286 rev 2 : description the toff_delay sets the time, in ms, from when a stop condition is received (control signal negated or a valid operation command received) until the unit st ops transferring energy to the output. smbus transaction type read/ write word number of data bytes 2 table 21. toff_fall command name toff_fall command code 65h description the toff_fall sets the time, in ms, from the end of the turnoff delay time until the voltage is commanded to zero. note that this command can only be used with a device whose output can sink enough current to cause the output voltage to decrease at a controlled rate. smbus transaction type read/ write word number of data bytes 2 table 22. status_byte command name status_byte command code 78h description the status_byte command returns one byte of information with a summa ry of the most critical faults smbus transaction type read byte number of data bytes 1 table 23. status_word command name status_word command code 79h description the status_word command returns two bytes of information with a summary of the units fault condition. smbus transaction type read word number of data bytes 2 table 24. status_vout command name status_vout command code 7ah description the status_vout commands returns one byte with status information on vout. table 20. toff_delay (continued)
AN2511 pmbus commands and source code doc id 13286 rev 2 17/43 smbus transaction type read byte number of data bytes 1 table 25. status_iout command name status_iout command code 7bh description status_iout commands returns one byte with status information on iout. smbus transaction type read byte number of data bytes 1 table 26. status_temperature command name status_temperature command code 7dh description status_temperature commands returns one byte with status information on temperature. smbus transaction type read byte number of data bytes 1 table 24. status_vout (continued)
pmbus commands and source code AN2511 18/43 doc id 13286 rev 2 table 27. status_mfr_specific command name status_mfr_specific command code 80h description status_mfr_specific commands returns one byte with the manufacturer specific status information. smbus transaction type read byte number of data bytes 1 table 28. read_vout command name read_vout command code 8bh description the read_vout command returns the actual measured output voltage in the same format as set by the vout_mode command. smbus transaction type read word number of data bytes 2 table 29. read_iout command name read_iout command code 8ch description the read_iout command returns the measured output current in amperes. smbus transaction type read word number of data bytes 2 table 30. read_temperature command name read_temperature command code 8dh description up to three temperature readings can be returned for each device. smbus transaction type read word number of data bytes 2
AN2511 pmbus commands and source code doc id 13286 rev 2 19/43 table 31. pmbus_revision command name pmbus_revision command code 98h description pmbus_revision command stores or reads the revision of the pmbus to which the device is compliant. smbus transaction type read byte number of data bytes 1 table 32. mfr_id command name mfr_id command code 99h description the mfr_id commands loads the unit with ascii characters that contain the manufacturer's id (name, abbreviation or symbol that identifies the unit's manufacturer). this is typically only done once at the time of manufacture. smbus transaction type read/write block number of data bytes 7 table 33. mfr_model command name mfr_model command code 9ah description the mfr_model command loads the unit with ascii characters that contain the manufacturer's model number. this is typically done once at the time of manufacture. smbus transaction type read/write block number of data bytes 6 table 34. mfr_revision command name mfr_revision command code 9bh description the mfr_revision command loads the unit with ascii characters that contain the manufacturer's revision number. this is typically done once at the time of manufacture. smbus transaction type read/write block number of data bytes 2
pmbus commands and source code AN2511 20/43 doc id 13286 rev 2 table 35. mfr_location command name mfr_location command code 9ch description the mfr_revision command loads the unit with ascii characters that contain the manufacturer's revision number. this is typically done once at the time of manufacture. smbus transaction type read/write block number of data bytes 2 table 36. mfr_date command name mfr_date command code 9dh description the mfr_date command loads the unit with ascii characters that id entify the unit's date of manufacture. this is typically done once at the time of manufacture. smbus transaction type read/write block number of data bytes 6 table 37. mfr_serial command name mfr_serial command code 9eh description the mfr_serial command loads the unit with a serial number to uniquely identify the unit smbus transaction type read/write block number of data bytes 6 table 38. mfr_specific_00 command name mfr_specific_00 command code d0h description the mfr_specific_00 command provides access control for nvm register writes. smbus transaction type read byte number of data bytes 1
AN2511 pmbus commands and source code doc id 13286 rev 2 21/43 3.2 source code the source code is attached in the zip file along with the application note. this source code is organized as shown below. ' workspace directory ' debug ' object files, list files, map files, executable files (.elf), hex code (.s19) ' sources ' main.c: contains main source code. in this file, pmbus interface functions are called (refer to section 3.3). ' main.h: contains prototype of all functions used in main.c. ' pmbus.c: contains functions for pmbus write and read operation. the data length calculator function and i2c and alert signal interrupt sub- routines are also written inside this file. ' pmbus.h: contains prototype of all functions and enumerated data types used in pmbus.c. ' smbus_master.c: contains source code for differnet smbus master transaction bus protocols. ' smbus_master.h: contains prototype of all functions and enumerated data types used in smbus_master.c. ' st72264g1.h: contains register mapping for st72f264g1 device. ' st7_hr.h: contains hardware register bit definitions for st7 mcu ' st7_config.h: contains compiler selection, peripheral register inclusion, header files inclusion for linking, macros for assembly instructions and fcpu definition. ' interrupt_vector.c: contains general interrupt vector table for st7 devices table 39. mfr_specific_01 command name mfr_specific_01 command code d1h description the mfr_specific_01 command provides access control for configuration register writes. smbus transaction type read byte number of data bytes 1 table 40. mfr_specific_02 command name mfr_specific_02 command code d2h description the mfr_specific_02 is a manufacturer defined command. smbus transaction type read byte number of data bytes 1
pmbus commands and source code AN2511 22/43 doc id 13286 rev 2 3.3 example this section explains how to use the pmbus driver. an example operation of write/ read commands are shown. /***************************************************************************** copyright 2005 stmicroelectronics source file name : main.c group : ims systems lab author : telecom team date first issued: 01/09/2006 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- the software included in this file is for guidance only. stmicroelectronics shall not be held liable for any direct, indirect or consequential damages with respect to any claims arising from use of this software. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- ********************************documentation********************************** general purpose - contains main source code. in this file, the pmbus command files are written. ******************************************************************************/ #include "st7_config.h" /* fcpu defined as 8mhz */ #include "main.h" /* contains the global variables used in main.c */ #include "st7_hr.h" /* contains the register and flags for st7 */ extern volatile unsigned int smb_timecount; /* time count variable */ #pragma space extern [] @tiny /* to force following variables into short addressing memory */ extern unsigned char data_buff [32] ; /* buffer to store data */ /* variables to differentiate the different smbus transaction types */ extern volatile unsigned char smbus_mode ; extern volatile unsigned char smb_err_status ; /* error status */ /* master to address slave with this address */ static volatile unsigned char pmbus_slaveadd = 0x80; /* master to address slave with this address */ static volatile unsigned char pmbus_slaveadd = 0x80; /*----------------------------------------------------------------------------- routine name : main input : none output : none description : using this file, user can write/ read pmbus commands. comments : programs jumpts into this routine when microcontroller is reset -----------------------------------------------------------------------------*/ void main() { unsigned char temp ; smbs_address_t pmbus_err ; /* to check errors in pmbus communication */ /*----------------------- port a configuration ----------------------------*/ paddr &= (unsigned char)~porta_default; paddr = porta_default ; /* other pins configured as floating input */ paor = (unsigned char)(porta_default) ; /*----------------------- port c configuration ----------------------------*/ pcddr = control ; /* pc0 floating input, others push pull output */
AN2511 pmbus commands and source code doc id 13286 rev 2 23/43 pcor = control ; pcdr = control ; /*----------------------- alert interrupt configuration --------------------- ----------*/ enableinterrupts; /* resets interrupt mask */ miscr1 = 0x10 ; /* ei0 on falling edge low level for alert interrupt */ /*---------------------pmbus communication configuration-------------------*/ while (1) { /* i2c configuration: st7 i2c address 0x30, communication speed 100khz */ pmbus_init (smbs_misc, slaveadd, 0x40, 0x23); /* checking if an alert signal is received from slave */ if (smbus_mode & smb_ara) { /* st7 i2c sends the alert response address to check which slave alerted */ pmbus_err = smbm_receivebyte (alertresponseadd, data_buff); /* alerted slave address will be used for any further communication */ pmbus_slaveadd = *data_buff ; smbus_mode &= (unsigned char) ~smb_ara ; } command_code = 0x01; /* user should enter the pmbus command code here */ pmbus_commandwrite (command_code); /* writes data from data_buff */ command_code = 0x02; /* user should enter the pmbus command code here */ /* read data and store it in data_buff */ pmbus_commandread (command_code); if (smb_err_status) { /* i2c status register read to clear any errors */ smb_err_status = i2csr2 ; smb_err_status = 0 ; } } /* end of while (1) */ } /* end of main */ 3.4 limitations 1. the smbus driver used in this application note is tested only for write word, read word and write block protocols with pec disabled. 2. the smbus driver doesn't meet the clock low extending feature of smbus v1.1 due to the limitation of the i 2 c peripheral. 3. in case of pec, when slave is acting as receiver, the ack bit is not disabled if the pec received from master transmitter is different from slave. it is stored in the user address as the last byte. it is the responsibility of the user to check the master pec with the slave pec to decide on data validity.
pmbus interfacing results AN2511 24/43 doc id 13286 rev 2 4 pmbus interfacing results this section describes the results of interfacing the demonstration board with artesyn and silabs modules. 4.1 interfacing with artesyn module the following table shows the different pmbus commands and st demonstration board results compared to the ar tesyn dpl20c pmbus module. table 41. pmbus interfacing with artesyn module: results command code pmbus command smbus transaction type number of data bytes data (si8250) data (st7) 01 operation read/ write byte 1 80 80 02 on_off_config read/ write byte 1 14 14 03 clear_faults send byte 0 12 restore_default_ all send byte 0 15 store_user_all send byte 0 20 vout_mode read/ write byte 1 1 a 1 a 21 vout_command read/ write word 2 00 60 00 60 24 vout_max read/ write word 2 01 60 01 60 25 vout_margin_high read/ write word 2 00 6 a 00 6 a 26 vout_margin_low read/ write word 2 00 56 00 56 42 vout_ov_warn_lim it read/ write word 2 00 6e 00 6e 43 vout_uv_warn_lim it read/ write word 2 00 56 00 56 46 iout_oc_fault_li mit read/ write word 2 00 19 00 19 4a iout_oc_warn_lim it read/ write word 2 00 17 00 17 4f ot_fault_limit read/ write word 2 00 78 00 78 50 ot_fault_respons e read/ write byte 1 b1 b1 51 ot_warn_limit read/ write word 2 00 6e 00 6e 60 ton_delay read/ write word 2 00 00 00 00 61 ton_rise read/ write word 2 00 0a 00 0a 64 toff_delay read/ write word 2 00 00 00 00 65 toff_fall read/ write word 2 00 00 00 00
AN2511 pmbus interfacing results doc id 13286 rev 2 25/43 4.2 interfacing wi th silabs module the following table shows the different pmbus commands and st demonstration board results compared to silicon labs si8250 - tb module. 78 status_byte read byte 1 41 41 79 status_word read word 2 00 41 00 41 7a status_vout read byte 1 00 00 7b status_iout read byte 1 00 00 7d status_temperatu re read byte 1 00 00 80 status_mfr_speci fic read byte 1 02 02 8b read_vout read word 2 00 01 00 01 8c read_iout read word 2 d7 c3 d7 c3 8d read_temperature read word 2 00 20 00 1d 98 pmbus_revision read byte 1 01 01 99 mfr_id read block 7 41 52 54 45 53 59 4e 41 52 54 45 53 59 4e 9a mfr_model read block 6 44 50 4c 32 30 43 44 50 4c 32 30 43 9b mfr_revision read/ write block 2 31 02 31 41 9c mfr_location read/ write block 2 5a 02 5a 53 9d mfr_date read/ write block 6 32 34 30 33 36 06 32 34 30 33 36 36 9e mfr_serial read/ write block 6 31 32 33 34 35 06 31 32 33 34 35 36 d0 mfr_specific_00 read byte 1 28 28 d1 mfr_specific_01 read byte 1 10 10 d2 mfr_specific_02 read byte 1 0a 0a table 41. pmbus interfacing with artesyn module: results (continued) command code pmbus command smbus transaction type number of data bytes data (si8250) data (st7) table 42. pmbus interfacing with silabs module: results command code pmbus command smbus transaction type number of data bytes data (si8250) data (st7) 01 operation read/ write byte 1 c0 c0 02 on_off_config read/ write byte 1 1e 1e
pmbus interfacing results AN2511 26/43 doc id 13286 rev 2 03 clear_faults send byte 0 12 restore_default_all send byte 0 15 store_user_all send byte 0 20 vout_mode read/ write byte 1 11 11 21 vout_command read/ write word 2 7f f6 7f f6 24 vout_max read/ write word 2 89 94 89 94 25 vout_margin_high read/ write word 2 00 6a 00 6a 25 vout_margin_high read/ write word 2 86 5c 86 5c 26 vout_margin_low read/ write word 2 79 90 79 90 42 vout_ov_warn_limit read/ write word 2 89 94 89 94 43 vout_uv_warn_limit read/ write word 2 76 58 76 58 4f ot_fault_limit read/ write word 2 eb 20 eb 20 50 ot_fault_response read/ write byte 1 00 00 51 ot_warn_limit read/ write word 2 ea d0 ea d0 60 ton_delay read/ write word 2 00 0a 00 0a 61 ton_rise read/ write word 2 00 32 00 32 64 toff_delay read/ write word 2 00 0a 00 0a 65 toff_fall read/ write word 2 00 c8 00 c8 78 status_byte read byte 1 04 04 79 status_word read word 2 00 04 00 04 7a status_vout read byte 1 00 00 7b status_iout read byte 1 00 00 7d status_temperature read byte 1 20 20 80 status_mfr_specific read byte 1 00 00 8b read_vout read word 2 80 4e 80 76 8c read_iout read word 2 d7 c3 00 00 8d read_temperature read word 2 ef 56 ef 56 98 pmbus_revision read byte 1 00 00 d0 mfr_specific_00 read byte 1 67 67 d1 mfr_specific_01 read byte 1 ef ef d2 mfr_specific_02 read byte 1 08 08 table 42. pmbus interfacing with silabs module: results (continued) command code pmbus command smbus transaction type number of data bytes data (si8250) data (st7)
AN2511 pmbus demonstration board doc id 13286 rev 2 27/43 5 pmbus demonstration board to show the features of the st7 i 2 c working as a pmbus, a demonstration board is available on request. please contact the nearest st office to get this board. the evaluation board has an st72f264g1 mcu that has 4 kbytes flash memory. all pmbus functionalities are not shown, as this evaluation board has hyperterminal interface which requires lot of messages to be stored in program memory. 5.1 system requirements in order to use the pmbus demonstration board with the windows operating system. the pc should support hyperterminal software and rs232 communication using db9 connector. 5.2 software setup to configure the pc hyperterminal software, the user should follow the steps as mentioned below. 1. click on start -> programs -> accessories -> communications -> hyperterminal as shown below. figure 6. pc hyperterminal application 2. select the correct port in which rs232 (9-pin cable) is connected (refer to section 3 ). 3. configure the following baud rate (bits per second) in hyperterminal: file -> properties -> connect to -> configure . if the user configures any baud rate other than 38400, then rs232 communication fails.
pmbus demonstration board AN2511 28/43 doc id 13286 rev 2 figure 7. baud rate configuration 4. configure the following settings in hyperterminal: file -> properties -> settings -> ascii setup figure 8. hyperterminal settings - ascii setup configuration 5. press call in hyperterminal to establish a connection with the board. 5.3 hardware setup to configure the hardware board, the user should follow these steps: 1. jumper settings: there are four jumpers (jp1, jp2, jp3 and jp4) available on the board. the detail of these connectors is as follows: a) jp1: jp1 pins should be connected using the jumper if there is no pull-up connected in the clock line of the i 2 c bus. once connected, the i 2 c clock line is pulled up with a resistor value of 4.7 k . b) jp2: jp2 pins should be connected using the jumper if there is no pull-up connected in the data line of the i 2 c bus. once connected, the i 2 c data line is pulled up with a resistor value of 4.7 k . c) jp3: jp3 is used to select the clock source for the st7 microcontroller. from the jp3 side, if the jumper is connected between pins 1 and 2 then the application
AN2511 pmbus demonstration board doc id 13286 rev 2 29/43 runs using the resonator clock (16 mhz). if the jumper is connected between pins 2 and 3 then the application is stopped and st7 mcu can be re-programmed. d) jp4: jp4 is used to select the power supply as described below. from the jp4 side, if the jumper is connected between pins 2 and 3 then the application runs using the direct supply given from `power ' connector. if the jumper is connected between pins 1 and 2 then the application runs using the dc adapter supply given from j1. 2. power settings: the demonstration board can be powered by one of the following options: a) dc adapter: connect a dc adapter to j1. the dc adapter should supply a minimum of 7 v and maximum of 18 v, 1 a. this supply is regulated to 5 v supply using an l7805 regulator. b) regulated supply: the user can use a direct 3 v to 5 v supply. the supply and gnd points should be connected to the `power' connector pins 1 and 2. here, `power' connector pin 1 is referred from the jp4 jumper side (from the right side).
using the demonstration board AN2511 30/43 doc id 13286 rev 2 6 using the demonstration board after installing the setup as explained in section 1 , the following message appears in hyperterminal. figure 9. hyperterminal message to show company name and selection of communication speed if there is any problem in getting the message, press the switch provided in the demonstration board. this switch re-starts the application. 6.1 normal operation the following sections explain how to initiate pmbus communication and how to read/ write pmbus commands with hyperterminal. 6.1.1 selection of communication speed after the message appears as shown in figure 9 , the user should enter 1 or 2 to select the pmbus communication speed as 100 khz or 400 khz respectively. the default speed value selected is 100 khz. if the user enters any other value other than 1 and 2, the previous speed value is retained. 6.1.2 selection of packet error checking after the message appears as shown in figure 10 , the user should enter 1 or 2 to enable pec and disable pec respectively. if pec is enabled, all address, command code and data communications are checked through crc-8 check. the default pec value is pec disabled. if the user enters any other value other than 1 and 2, the previous speed value is retained. figure 10. pec selection 6.1.3 selection of slave address the user should enter the slave address of the pmbus device. the slave address should be in hexadecimal format. the slave addresses of different competitor?s module are given below. artesyn dpl20c module: 0x30 silabs si8250-tb module : 0x80. the slave address could change from one device to another device. the user must refer to the product datasheet and development kit docum ents to decide on the slave address. an example entry of slave address with artesyn dpl20c module is shown below.
AN2511 using the demonstration board doc id 13286 rev 2 31/43 figure 11. slave address entry message if the user enters a wrong slave address then one of the following error messages shown in figure 12 or figure 13 appears. figure 12. wrong slave address entry - response 1 figure 13. wrong slave address entry - response 2 6.1.4 selection of read/write mode data can be written into or data can be read back from the pmbus salve device connected. the following figure provides the key option to select one of the modes. figure 14. options to select read/ write mode 6.1.5 single read mode the user can press 1 to select read mode. then the user can enter any command code with reference to section 3 to read byte/ word/ block of data. an example of this is shown below. figure 15. single read operation
using the demonstration board AN2511 32/43 doc id 13286 rev 2 6.1.6 continuous read mode the user can press 0 to read all pmbus commands. the lists of supported commands are shown in the following figure. figure 16. continuous read operation command codes 0xd0, 0xd1 and 0xd2 are not supported in continuous read mode. if the user wants to read these commands, they can be read by using single read mode. 6.1.7 write mode the user can press 2 to select write mode. after the following figure appears, the user can enter any command code with reference to section 2.1 on page 8 to write byte/ word/ block of data. figure 17. write mode command code entry message from hyperterminal then the user can enter any command code with reference to section 4 to write byte/ word/ block of data. the user can enter data after the following message. figure 18. write mode data entry message from hyperterminal data should be entered in hex format. if the user wants to enter date/ serial numbers, they should be entered in ascii format.
AN2511 using the demonstration board doc id 13286 rev 2 33/43 for example, to enter a date as ?15 -12-1991?, then data should be entered as 313531323931 (where 31h=ascii ?1?, 35h=ascii ?5?, etc., and the date will read ?151291?). an example of this operation is shown below. figure 19. write mode operation example when reading back the date written using single read commands, the following message is displayed: figure 20. read operation to check data writing 6.1.8 group command the user can press 3 to select group command mode. in this demonstration board, the user can write multiple commands for multiple slave addresses. after figure 21 appears, the user can enter any command code and data with reference to section 3.1: pm bus commands to write byte/ word/ block of data. the user can enter 5 commands and data for the group command. if the user wants to write less than 5 commands, the user can press * to terminate the group command operation.
using the demonstration board AN2511 34/43 doc id 13286 rev 2 figure 21. group command code entry message from hyperterminal an example of this operation is shown below. figure 22. group command operation example 6.2 error conditions the following error conditions may be encountered during pmbus communication. 6.2.1 invalid command code if the user enters a command code that is not available in the list or enters an incorrect option to select read/write options, the following error message appears: figure 23. invalid command message an example is shown in figure 24 .
AN2511 using the demonstration board doc id 13286 rev 2 35/43 figure 24. example of invalid command 6.2.2 communication timeout this error appears when the pmbus communication fails due to one of the following reasons: the slave device doesn?t acknowledge the master the clock low interval exceeds the value of ttimeout,min as defined by ( smbus specification 1.1 ) tlow:sext and tlow:mext conditions are not met bus error or arbitration errors in pmbus communication in these conditions, the following error message appears: figure 25. communication timeout message
hardware description AN2511 36/43 doc id 13286 rev 2 7 hardware description this section provides schematics, bom (bill of materials), layout and picture of the demonstration board. 7.1 schematic and layout the following figures show the schematic and layouts of the demonstration board. figure 26. demonstration board schematic !-v 9 -(z # n& # pf # pf 2 k 3 2 2 2  2 3#, 3$! 2 k 2 k 0! 2%3%4  /3#  /3#  633  0"  6$$  0!  0!  0!  )##3%,  3#,0!  2$)0!  3$!0!  4$/0!  0!  0"  0"  0"  0#  0#  0#  0#  330"  3#+0"  -)3/0"  -/3)0"  0#  0#  5 34&'- 4$/ 2$) 6           #/.  )## 2%3%4 )##3%, 2%3%4 /3# /3# )##$!4! )###,+ )##3%, 6## /3# 2  k    *0 /3#). /3#). 3$! 3#, 3-"?!,%24 2%3%4 2  2 $ 3-$ ,%$ 0! )##$!4! )###,+   *0   *0 )## #/. -#5 0-"53 # n&          * $" #  6  #  #  #  6  4/54  2).  2/54  4).  4).  2/54  2).  4/54  '.$  6##  5 34#42 # u& 6 # u& 6 # u& 6 # u& 6 6 23 ).4%2&!#% 2$) 4$/ 6  40 #/.     * #/.  3-"?!,%24 #/.42/, #/.42/, 6 # n & -5,4)0(!3% /0%2!4)/.3 0/7%2 -!.!'%-%.4 &!5,4 0" 0" 0" 0" 0" 0"        * #/.    * #/.   * #/.    * #/.  0# 0# 0# 0# 0# 0" 0" 0# 0# 0# 0# 0# 0" 0" 0" 0" 0" 0" 0" 0" ).4%2&!#% 2% 3%4 %84 ).4%2&!#%    * *!#+ # n& # n & )  '  /  5 ,#$4 42 # u&v 6 6^6 6 6## 6$$ '.$  40  40 # n &
AN2511 hardware description doc id 13286 rev 2 37/43 figure 27. top view layout of the demonstration board figure 28. bottom view layout of the demonstration board
AN2511 hardware description doc id 13286 rev 2 38/43 7.2 bill of materials (bom) the following table shows the bom of the demonstration board. table 43: table 43. bill of material reference value / generic part number package manufacturer manufacturer?s ordering code / orderable part number supplier capacitors: c2, c3, c9, c10, c11, c12, c13 100 nf 805 any capacitors: c7, c8 10 nf 805 any capacitors: c5, c6 10 pf 805 any capacitors: c1 330 nf 805 any polarized capacitor (axial): c4 100 f/ 10 v rb-5.5 any resistors: r1, r2, r3 4.7 k 805 any resistors: r4, r5 100 805 any resistors: r6 220 805 any resistors: r7 10 k 805 any connector: tp3 con1 sip-1 any connectors: j2, j3, j4, jp1, jp2, power con2 sip-2 any connectors: jp3, jp4 con3 sip-3 any connector: j5 con4 sip-4 any connector j7 con7 sip-7 any 9 pin female rs232 connector: j6 db9 db9/f gm (801-036) crystal: y1 16 mhz (kds) xtal-1 any header: con1 icc idc-10b any power jack connector: j1 jack tap_2.5 mm gm: k375a regulator: u1 l7805cd2t-tr to-220 stmicroelectronics l7805cd2t-tr smd led: d1 smd led led-smd faichild
hardware description AN2511 39/43 doc id 13286 rev 2 mcu u2 st72f264g1m6 sol-28 stmic roelectronics st72f264g1m6 rs232 level translator: u3 st3232ct r so-16 stmicroelectronics st3232ctr switch s1 tact switch push-4 any diode: d2 1n5817 do41 stmicroelectronics zener diode: zd1 smaj to 220 stmicroelectronics table 43. bill of material (continued) reference value / generic part number package manufacturer manufacturer?s ordering code / orderable part number supplier
hardware description AN2511 40/43 doc id 13286 rev 2 7.3 demonstration board photo the following figure shows the picture of the demonstration board. figure 29. steval-isq002v1
AN2511 configuration doc id 13286 rev 2 41/43 appendix a configuration a.1 rs232 configuration the following figure shows the pin description of the rs232 d9 connector. figure 30. pin description of rs232 d9 connector
revision history AN2511 42/43 doc id 13286 rev 2 revision history table 44. document revision history date revision changes 17-apr-2007 1 initial release. 25-aug-2010 2 ? modified: figure 9 , 10 , 16 , 17 , 18 , 19 , 20 , 23 , 24 , 25 , 26 , 29 , ta b l e 4 3 ? added: figure 27 , 28 ? minor text changes
AN2511 doc id 13286 rev 2 43/43 please read carefully: information in this document is provided solely in connection with st products. stmicroelectronics nv and its subsidiaries (?st ?) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described he rein at any time, without notice. all st products are sold pursuant to st?s terms and conditions of sale. purchasers are solely responsible for the choice, selection and use of the st products and services described herein, and st as sumes no liability whatsoever relating to the choice, selection or use of the st products and services described herein. no license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. i f any part of this document refers to any third party products or services it shall not be deemed a license grant by st for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoev er of such third party products or services or any intellectual property contained therein. unless otherwise set forth in st?s terms and conditions of sale st disclaims any express or implied warranty with respect to the use and/or sale of st products including without limitation implied warranties of merchantability, fitness for a parti cular purpose (and their equivalents under the laws of any jurisdiction), or infringement of any patent, copyright or other intellectual property right. unless expressly approved in writing by an authorized st representative, st products are not recommended, authorized or warranted for use in milita ry, air craft, space, life saving, or life sustaining applications, nor in products or systems where failure or malfunction may result in personal injury, death, or severe property or environmental damage. st products which are not specified as "automotive grade" may only be used in automotive applications at user?s own risk. resale of st products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by st for the st product or service described herein and shall not create or extend in any manner whatsoev er, any liability of st. st and the st logo are trademarks or registered trademarks of st in various countries. information in this document supersedes and replaces all information previously supplied. the st logo is a registered trademark of stmicroelectronics. all other names are the property of their respective owners. ? 2010 stmicroelectronics - all rights reserved stmicroelectronics group of companies australia - belgium - brazil - canada - china - czech republic - finland - france - germany - hong kong - india - israel - ital y - japan - malaysia - malta - morocco - philippines - singapore - spain - sweden - switzerland - united kingdom - united states of america www.st.com


▲Up To Search▲   

 
Price & Availability of AN2511

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X